#include "app_mqtt.h"
#include "unistd.h"
int mqtt_recv_callback(char *json) {
    // TODO: 处理接收到的数据

    log_debug("mqtt_recv_callback: %s", json);
    return 0;
}

int main(int argc, char const *argv[])
{
    app_mqtt_init();
    app_mqtt_registerRecvCallback(mqtt_recv_callback);
    app_mqtt_send("{\"conn_type\":1,\"id\":\"XY\",\"msg\":\"abcd\"}");
    sleep(1000);
    app_mqtt_close();
    return 0;
}
